package cn.ycxy.lbl.pojo.posts.domain;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 失物招领、拼车服务、二手交易帖子表
 * </p>
 *
 * @author lbl
 * @since 2023-03-15
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@Data
@ApiModel(value="LblCsDiscussPost对象", description="失物招领、拼车服务、校园风景、二手交易帖子表")
public class LblCsDiscussPost implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户id")
    private Integer userId;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "内容")
    private String content;

    @ApiModelProperty(value = "图片集合")
    private String imgUrls;

    @ApiModelProperty(value = "帖子评论总数")
    private Integer commentCount;

    @ApiModelProperty(value = "0-失物招领; 1-拼车服务; 2-校园风景; 3-二手交易")
    private Integer type;

    @ApiModelProperty(value = "二手交易物品分类id")
    private Integer classifyId;

    /**
     * 逻辑删除
     *  0 : 未删除
     *  1 : 已删除
     *  逻辑删除注解, 在每次查询时, 都将会带上该逻辑删除字段进行查询
     */
    @TableLogic
    @TableField(value = "status")
    @ApiModelProperty(value = "0-正常; 1-拉黑;")
    private Integer status;

    @ApiModelProperty(value = "商品原总价")
    private BigDecimal amountOfOriginalPrice;

    @ApiModelProperty(value = "商品现总价")
    private BigDecimal amountOfCurrentPrice;

    @ApiModelProperty(value = "数据创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "数据最后更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "分数（冗余）")
    private Double score;

    @ApiModelProperty(value = "是否完成交易: 0-未完成; 1-已完成")
    private Integer isFinishDeal;

}
